function createTaskModule(){
	//My Task
	var projectTaskStore=CRM.commons.createStore('projectTaskStore',CRM.SPComp.projectTaskArray,'projectTask/tasksByProjectId');
	var taskHomeGrid=CRM.commons.createGrid('taskHomeGrid',projectTaskStore,CRM.SPComp.projectTaskColModel('taskHomeGrid'));
	
	var mytaskstore=CRM.commons.createStore('mutaskstore',CRM.SPComp.projectTaskArray,'projectTask/taskForme');
	var mytaskGrid=CRM.commons.createGrid('mytaskGrid',mytaskstore,CRM.SPComp.projectTaskColModel('mytaskGrid')); 
	//Home
	var projecthomeStore=CRM.commons.createComboStore('projecthomeStore','projectTask/taskDropDownList?operation='+"projects"); 
	var memberhomeStore=CRM.commons.createComboStore('memberhomeStore','projectTask/taskDropDownList');
	var priorityhomeStore=CRM.commons.createComboStore('priorityhomeStore','projectTask/taskDropDownList?operation='+"priority");
	
	var taskDetail={
		xtype:'panel',
		title:'New Task',
		id:'taskDetail',
		items:[createProjectTask(false,"0","",'local')]
	};
	
	
	var homeHeaderpanel={
		xtype:'fieldset',
		id:'homeHeaderpanel',
		height:60,
		items:[
		       {
		    	   xtype:'compositefield',
		    	   items:[
		    	          	{xtype:'displayfield',html:'Assign To'},
					       	{
		    	          		xtype:'combo',
		    	          		id:'assignTohome',
		    	          		store		: memberhomeStore,
	                            displayField : 'name',
	                            valueField  	: 'id',
	                            triggerAction: 'all',
	                            width		: 160,
	                            editable		: false,
	                            mode		:'local'
					       	},
					       	{xtype:'displayfield',html:'Project'}
					       	,
					       	{
					       		xtype    	: 'combo',
                                id       	: 'projecthomeid',
                                store		: projecthomeStore,
                                displayField : 'name',
                                valueField  	: 'id',
                                triggerAction: 'all',
                                width		: 160,
                                editable		: false,
                                listeners : {select : function(combo,record,index){
					       		memberhomeStore.reload({
					       			params:{
					       			operation:'members',
					       			projectId:record.get('id')
					       			
					       		}
					       		});
					       	}
					       	}
                                
                            
					       	}
					       	,
					       	{xtype:'displayfield',html:'Priority'}
					       	,
					       	{
					       		xtype    	: 'combo',
                                id       	: 'homePriority',
                                store		: priorityhomeStore,
                                displayField : 'name',
                                valueField  	: 'id',
                                
                                triggerAction: 'all',
                                width		: 160,
                                editable		: false
					       	}
					       	,
					       	{xtype:'button',text:'Search',
					       		handler:function(){
					       		var projid=Ext.getCmp('projecthomeid');
					       		var pritid=Ext.getCmp('homePriority');
					       		var assignid=Ext.getCmp('assignTohome');
					       	
					       		projectTaskStore.reload({
					       			params:{
					       			projectId:projid.getValue(),
					       			priorityId:pritid.getValue(),
					       			assigntoId:assignid.getValue()
					       		}
					       		});
					       	}
					       	}
					     ]
		       }
		       ]
	};
	var taskHome={
			xtype:'panel',
			title:'Home',
			id:'taskHome',
			items:[homeHeaderpanel,taskHomeGrid]
	};
	
	var mytaskHeaderPanel={
			xtype:'fieldset',
			id:'mytaskheaderpanel',
			height:60,
			items:[{	xtype:'compositefield',
			       		items:[
			       	{xtype:'displayfield',html:'Project'}
			       	,
			       	{
			       		xtype    	: 'combo',
			       		id       	: 'mytaskprojectid',
			       		store		: projecthomeStore,
			       		displayField : 'name',
			       		valueField  	: 'id',
			       		triggerAction: 'all',
			       		width		: 160,
			       		editable		: false
			      	}
			       	,
			       	{xtype:'displayfield',html:'Priority'}
			       	,
			       	{
			       		xtype    	: 'combo',
			       		id       	: 'mytaskpriority',
			       		store		: priorityhomeStore,
			       		displayField : 'name',
			       		valueField  	: 'id',
			       		
			       		triggerAction: 'all',
			       		width		: 160,
			       		editable		: false
			       	}
			       	,
			       	{xtype:'button',text:'Search',
			       		handler:function(){
			       		var projid=Ext.getCmp('mytaskprojectid');
			       		var pritid=Ext.getCmp('mytaskpriority');
			       		mytaskstore.reload({
			       			params:{
			       			projectId:projid.getValue(),
			       			priorityId:pritid.getValue(),
			       			assigntoId:0
			       		}
			       		});
			       	}
			       	}
			]}

			       ]
	};
	var mytask={
			xtype:'panel',
			title:'My Task',
			id:'mytask',
			items:[mytaskHeaderPanel,mytaskGrid]
	};
	
	var taskModuleTabs=new Ext.TabPanel({
		
		id:'taskModuleTabs',
		items:[taskHome,mytask,taskDetail]
	});
	return taskModuleTabs;
}